classDiagram
    class Context {
        -State state
        +setState(state: State)
        +request()
    }
    
    class State {
        <<interface>>
        +handle(context: Context)
    }

    class ConcreteStateA {
        +handle(context: Context)
    }

    class ConcreteStateB {
        +handle(context: Context)
    }

    Context --> State : has a
    State <|.. ConcreteStateA
    State <|.. ConcreteStateB
